
package com.wy2cloud.jpa;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 系统名称 xx平台
 * 工程名称 wy2-cloud
 * 创建时间 2017/8/1 14:42
 *
 * @author admin
 * @since 1.8
 */
@NoRepositoryBean
public interface BaseJpaRepository<T, ID extends Serializable> extends PagingAndSortingRepository<T, ID> {
    public <D> List<D> findListBySql(final String sql, final Object... values);

    public List<Map<String,Object>> findListMapBySql(final String sql, final Object... values);

    public <D> Page<D> findPageBySql(final String sql, final Pageable pageable, final Object... values);
    public Page<Map<String,Object>> findPageForMapBySql(final String sql, final Pageable pageable, final Object... values);
}
